## Copyright (C) 2010 E. Zuniga J. Hidalgo
##
## This file is used for the DSP course 
##
## Octave is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or (at
## your option) any later version.
##
## Octave is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Octave; see the file COPYING.  If not, see
## <http://www.gnu.org/licenses/>.

## -*- texinfo -*-
## @deftypefn {Function File} {} verParcial(@var{N})
## La funcion verParcial(N) recibe un valor N y grafica las primeras N
## muestras para las fuciones y=sin(2*pi*f*n) con f =[0.01,0.02,0.05,0.1]
## Dicha funcion muestra las graficas separadas en una misma hoja
## Ademas permite almancenar la grafica en un archivo formato EPS.
## @seealso{stem, plot, print}
## @end deftypefn
## Autores: Esteban zuniga  y  Jorge hidalgo
## Creado: Agosto 2010

function verParcial (N)
	n = [0:N].';
	f = [0.01,0.02,0.05,0.1]
	disp('graficando para el valor de f=0.01')
	pause
	subplot(2,2,1) 
	y1= sin(2*pi*f(1,1)*n); 
	stem(y1) 
	disp('graficando para el valor de f=0.02')
	pause
	subplot(2,2,2)
	y2= sin(2*pi*f(1,2)*n); 
	stem(y2);
	disp('graficando para el valor de f=0.05')
	pause 
	subplot(2,2,3)
	y3= sin(2*pi*f(1,3)*n);
	stem(y3);
	disp('graficando para el valor de f=0.10')
	pause
	subplot(2,2,4)
	y4= sin(2*pi*f(1,4)*n);
	stem(y4)
	disp('almacenando la grafica en formato eps')
	pause
	print -deps -color verParcial.eps
end

